﻿using BigEgg.Framework.Foundation;
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data.Objects.DataClasses;

namespace FMStudio.Domain.Test.MockClasses
{
    [MetadataType(typeof(ICity))]
    public class MockCity : EntityObject, ICity, IDataErrorInfo
    {
        #region DataErrorInfo
        [NonSerialized]
        private readonly DataErrorInfoSupport dataErrorInfoSupport;

        string IDataErrorInfo.Error { get { return this.dataErrorInfoSupport.Error; } }

        string IDataErrorInfo.this[string memberName] { get { return this.dataErrorInfoSupport[memberName]; } }
        #endregion

        public MockCity()
        {
            this.dataErrorInfoSupport = new DataErrorInfoSupport(this);
        }

        public string Name { get; set; }
    }
}
